﻿namespace Vibstudio.NetConfigurator.UI.ViewModels
{
    #region Namespaces

    using System.Windows.Input;

    using Vibstudio.NetConfigurator.UI.Common;
    using Vibstudio.NetConfigurator.UI.Model;

    #endregion

    public class ResultValidationUrlViewModel : ViewModelBase
    {
        #region Fields

        private RelayCommand _goToHomeCommand;

        private ResultValidationUrlCollection _result;

        #endregion

        #region Ctor(s)

        public ResultValidationUrlViewModel(ResultValidationUrlCollection result)
        {
            Result = result;
        }

        #endregion

        #region Public Properties

        public ICommand GoToHomeCommand
        {
            get { return _goToHomeCommand ?? (_goToHomeCommand = new RelayCommand(GoToHome)); }
        }

        public ResultValidationUrlCollection Result
        {
            get { return _result; }
            set
            {
                _result = value;
                base.OnPropertyChanged("Result");
            }
        }

        #endregion

        #region Methods

        private void GoToHome(object o)
        {
            ViewModelLocator.SetChild(ViewRepository.Get.Home());
        }

        #endregion
    }
}